import request from "../../request.js"


//根据id查询分类
function productDetail(id){
	return request({
		url:`/lejuClient/product/productDetail/${id}`

	})
}


//添加购物车
function addCart(data){
	return request({
		url:`/lejuClient/cart/addCart`,
		method:"post",
		data
	})
}
//立即购买 生成确认单
function addPreOrder(data){
	return request({
		url:`/lejuClient/order/addPreOrder`,
		method:"post",
		data
	})
}

//取消订单
function cancelOrder(id){
	return request({
		url:`/lejuClient/order/cancelOrder/${id}`,
		method:"post",
		
	})
}
export {
	productDetail,
	addCart,
	addPreOrder,
	cancelOrder
}